﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace MvcJQueryTest.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            ViewBag.Message = "Welcome to ASP.NET MVC!";

            return View();
        }

        public ActionResult JQueryEvents()
        {
            return View();
        }

        public ActionResult JQuerySlides()
        {
            return View();
        }

        public ActionResult JQuerySlider()
        {
            return View();
        }

        public ActionResult JQueryEach()
        {
            return View();
        }

        public ActionResult JQueryCustomEvents()
        {
            return View();
        }

        public ActionResult OwnSlider()
        {
            return View();
        }

        public ActionResult LessCss()
        {
            return View();
        }

        public ActionResult HTML5Elements()
        {
            return View();
        }

        public ActionResult JavaScriptGrundlagen()
        {
            return View();
        }

        public ActionResult LocalStorage()
        {
            return View();
        }

        public ActionResult JQueryTableSearch()
        {
            return View();
        }

        public ActionResult CSS3()
        {
            return View();
        }

        public ActionResult JQueryInputClear()
        {
            return View();
        }

        public ActionResult JQueryAjax()
        {
            return View();
        }

        [HttpPost]
        public ActionResult Save(string name, string textToSave)
        {
            //Save data
            string newName = name;

            return new JsonResult() { Data = "User was saved!" };
        }

        [HttpPost]
        public ActionResult GetData()
        {
            return new JsonResult() { Data = "Just Some Data" };
        }

        [HttpPost]
        public ActionResult GetName(string vorname, string nachname)
        {
            return new JsonResult() { Data = string.Format("Name: {0} {1}", vorname, nachname) };
        }

        public ActionResult JQueryAjaxForm()
        {
            return View();
        }
    }
}
